<?= $this->partial('groups/menu.phtml'); ?>

<br/>

<div class="content-full">

<h1>Right list</h1>

This list serves only as a overview of the rights in the system.

<table class='shaded'>

<?php foreach($this->rights as $right) : ?>

	<tr>
		<th colspan='2'><?= $right->name ?> (<?= $right->handle; ?>)</th>
	</tr>
	
	<tr class='odd'>
		<td colspan='2'><em><?= $right->description; ?></em></td>
	</tr>
	
	<?php foreach($right->allows as $allow) : ?>
	
	<tr>
		<td>
			<?php if (!$allow['module'] && !$allow['controller']): ?>
			<b><em>*All*</em></b>
			<?php else: ?>
			<?= $allow['module'] . " / " . $allow['controller'] ?>
			<? endif; ?>
		</td>
		<td>
			<? if (is_null($allow['action'])) : ?>
			<b><em>*All*</em></b>
			<? else: ?>
			<?= $allow['action']?>
			<? endif; ?>
		</td>
	</tr>
	
	<? endforeach; ?>
<? endforeach; ?>
	
</table>

</div>
		